{% extends "base.html" %}

{% block title %}登录 - SteHub{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6 col-lg-5">
        <div class="card">
            <div class="card-header">
                <h3 class="text-center mb-0"><i class="fas fa-sign-in-alt me-2"></i>用户登录</h3>
            </div>
            <div class="card-body">
                <form method="POST" action="{{ url_for('auth.login') }}">
                    <div class="mb-3">
                        <label for="username" class="form-label">用户名或邮箱</label>
                        <input type="text" class="form-control" id="username" name="username" 
                               value="{{ request.form.username if request.form }}" required
                               placeholder="请输入用户名或邮箱">
                    </div>
                    
                    <div class="mb-3">
                        <label for="password" class="form-label">密码</label>
                        <input type="password" class="form-control" id="password" name="password" 
                               required placeholder="请输入密码">
                    </div>
                    
                    <div class="mb-3 form-check">
                        <input type="checkbox" class="form-check-input" id="remember_me" name="remember_me">
                        <label class="form-check-label" for="remember_me">记住登录状态</label>
                    </div>
                    
                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-primary btn-lg">
                            <i class="fas fa-sign-in-alt me-2"></i>登录
                        </button>
                    </div>
                </form>
                
                <div class="text-center mt-4">
                    <p class="mb-2">
                        <a href="{{ url_for('auth.forgot_password') }}" class="text-decoration-none">
                            <i class="fas fa-key me-1"></i>忘记密码？
                        </a>
                    </p>
                    <p class="mb-0">
                        还没有账户？
                        <a href="{{ url_for('auth.register') }}" class="text-decoration-none">立即注册</a>
                    </p>
                </div>
            </div>
        </div>

        <!-- 第三方登录（预留） -->
        <div class="card mt-4">
            <div class="card-body text-center">
                <h6 class="text-muted mb-3">其他登录方式</h6>
                <div class="d-grid gap-2">
                    <button type="button" class="btn btn-outline-secondary" disabled>
                        <i class="fab fa-google me-2"></i>Google 登录（开发中）
                    </button>
                    <button type="button" class="btn btn-outline-secondary" disabled>
                        <i class="fab fa-github me-2"></i>GitHub 登录（开发中）
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}